#include "BDD.h"





void Init ( LinkedList *l )
{
	l->head = NULL ;
}

void DeInit ( LinkedList *l )
{
	Node *temp = l->head ;
	while(temp != NULL)
	{
		l->head = l->head->link ;
		free(temp);
		temp = l->head ;
	}
}

void AddLast(LinkedList *l, int item, vertex *v)
{
	Node *n = (Node*) malloc (sizeof(Node) ) ; // dynamic allocation on the stack the AddLast stack Frame
	n->data = item ;
	n->vert = v;
	n->link = NULL ;

	if ( l->head == NULL )
		l->head = n ;
	else
	{
		Node *temp = l->head ;
		while(temp->link != NULL )
			temp = temp->link ;
		temp->link = n ;
	}
}

